package me.zhengjie.suli.wcs.domain;

import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.bean.copier.CopyOptions;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import me.zhengjie.base.BaseEntity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;

@Entity
@Data
@Table(name = "agv_task_detail")
public class AgvTaskDetail extends BaseEntity implements Serializable {
    @Id
    @Column(name = "`id`")
    @ApiModelProperty(value = "ID")
    private String id;

    @Column(name = "`status`")
    @ApiModelProperty(value = "任务状态")
    private Integer status;

    @Column(name = "`task_code`")
    @ApiModelProperty(value = "任务号")
    private String taskCode;

    @Column(name = "`task_priority`")
    @ApiModelProperty(value = "任务优先级")
    private Integer taskPriority;

    @Column(name = "`container_code`")
    @ApiModelProperty(value = "料箱号")
    private String containerCode;

    @Column(name = "`container_type`")
    @ApiModelProperty(value = "料箱类型")
    private String containerType;

    @Column(name = "`storage_tag`")
    @ApiModelProperty(value = "工作位标签")
    private String storageTag;

    @Column(name = "`from_location_code`")
    @ApiModelProperty(value = "起始库位")
    private String fromLocationCode;

    @Column(name = "`to_station_code`")
    @ApiModelProperty(value = "目标操作台")
    private String toStationCode;

    @Column(name = "`to_location_code`")
    @ApiModelProperty(value = "目标库位")
    private String toLocationCode;

    @Column(name = "`main_id`")
    @ApiModelProperty(value = "主表ID")
    private String mainId;

    @Column(name = "`source_code`")
    @ApiModelProperty(value = "WMS任务号")
    private String sourceCode;

    public void copy(AgvTaskDetail source){
        BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
    }


}
